package com.qf.commons.event.core.standrad;


import com.qf.commons.event.entity.QphoneMessage;

/**
 * 消费端的拦截器
 * description:
 * author: Ken
 * 公众号：Java架构栈
 */
public interface ConsumerInterceptor {

    /**
     * 当前的消息，是否能够被当前拦截器处理
     * @param qphoneMessage
     * @return
     */
    default boolean isSupport(QphoneMessage qphoneMessage){
        return true;
    }

    /**
     * 消息的后置处理方法
     * @return
     */
    default QphoneMessage msgPostProcessor(QphoneMessage qphoneMessage){
        return qphoneMessage;
    }
}
